package com.lavida.project.system.papers.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lavida.project.system.papers.domain.SubPapers;
import com.lavida.project.system.papers.mapper.SubPapersMapper;
@Service
public class SubPapersServiceImpl implements SubPapersService{
	@Autowired
	private SubPapersMapper subPapersMapper;
	@Override
	public List<SubPapers> selectSubPapersBySubId(int subId) {
		// TODO Auto-generated method stub
		return subPapersMapper.selectSubPapersBySubId(subId);
	}
	@Override
	public SubPapers selectBySubId(int subId) {
		// TODO Auto-generated method stub
		return subPapersMapper.selectBySubId(subId);
	}
	@Override
	public int deleteSub(int id) {
		// TODO Auto-generated method stub
		return subPapersMapper.deleteSub(id);
	}
	@Override
	public int addSub(SubPapers subPapers) {
		// TODO Auto-generated method stub
		return subPapersMapper.addSub(subPapers);
	}
	@Override
	public int updateSub(SubPapers subPapers) {
		// TODO Auto-generated method stub
		return subPapersMapper.updateSub(subPapers);
	}
	@Override
	public void deleteSubp(int[] ids) {
		// TODO Auto-generated method stub
		for(int papers_id : ids) {
			subPapersMapper.deleteSubp(papers_id);
		}
	}

}
